package com.example.evanproject.mapper;

import com.example.evanproject.domain.Coursemodule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author hanxiaoqi
* @description 针对表【coursemodule】的数据库操作Mapper
* @createDate 2024-03-09 21:52:12
* @Entity generator.domain.Coursemodule
*/
@Mapper
public interface CoursemoduleMapper extends BaseMapper<Coursemodule> {

    @Select("select * from coursemodule where sc_id=#{id}")
    List<Coursemodule> selectById(Integer id);



    @Insert("insert into coursemodule (sc_fid,mo_name) values (#{scFid},#{moName})")
    @Options(useGeneratedKeys=true, keyProperty="moId", keyColumn="mo_id")
    Integer addcourseModule(Coursemodule courseModule);
}




